import request from '@/utils/request'

export const getEmployeeList = params => request.get('/sys/user', { params })

export const getExportEmployeeList = () => request.get('/sys/user/export', { responseType: 'blob' })

export const getEmployeeTemplate = () => request.get('/sys/user/import/template', { responseType: 'blob' })

export const updateEmployee = data => request.post('/sys/user/import', data)

export const newEmployee = data => request.post('/sys/user', data)

export const getUser = id => request.get(`/sys/user/${id}`)

export const editUser = data => request.put(`/sys/user/${data.id}`, data)
